using System;
using System.Collections.Generic;

namespace Pro.Data
{
    interface DatabaseSever
    {
        void ConnectDB();
        void CloseDB();
        void CreatTable<T>() where T : BaseTableMode, new();
        void CreatTable(Type type);
        void WriteTable<T>() where T :  BaseTableMode, new();
        void DeleteTable<T>() where T : BaseTableMode, new();
        void Insert<T>(T t) where T : BaseTableMode, new();
        void DeleteTableInfos<T>() where T : BaseTableMode, new();
        void DeleteByOnlyId<T>(T t) where T : BaseTableMode, new();
        void UpdateByOnlyId<T>(T t) where T : BaseTableMode, new();
        bool SearchByOnlyId<T>(ref T t) where T : BaseTableMode, new();
        void ReadTable<T>() where T : BaseTableMode, new();
        void ReadTable<T>(T t) where T : BaseTableMode, new();
        int GetTableRecordCount<T>() where T : BaseTableMode, new();
        bool ExistTable<T>() where T : BaseTableMode, new();
        bool ExistTable(Type type);
        int TableCount();
        List<string> GetAllTableName();
         void ExcuteDB(Action action,bool isCloseDB=false);

    }
}
